// 首页
const Main = (resolve) => {
  import('@/components/main/main').then((module) => {
    resolve(module)
  })
}
const DeviceType = (resolve) => {
  import('@/components/device/type/DeviceType').then((module) => {
    resolve(module)
  })
}
// 三级路由 用于 二级的占位页
const PlacesHolder = (resolve) => {
  import('@/components/main/PlacesHolder').then((module) => {
    resolve(module)
  })
}
const DeviceManage = (resolve) => {
  import('@/components/device/manage/DeviceManage').then((module) => {
    resolve(module)
  })
}
const BigDevice = (resolve) => {
  import('@/components/device/big_device/BigDevice').then((module) => {
    resolve(module)
  })
}
const EnergyDataRouter = (resolve) => {
  import('@/components/energyConsumption/EnergyDataRouter').then((module) => {
    resolve(module)
  })
}
const RenoutsSysImg = (resolve) => {
  import('@/components/energyConsumption/RenoutsSysImg').then((module) => {
    resolve(module)
  })
}
const Automation = (resolve) => {
  import('@/components/automation/Automation').then((module) => {
    resolve(module)
  })
}
const DataCharts = (resolve) => {
  import('@/components/form/DataCharts').then((module) => {
    resolve(module)
  })
}
// 空间管理
const Space = (resolve) => {
  import('@/components/space/Space').then((module) => {
    resolve(module)
  })
}
const StationSpace = (resolve) => {
  import('@/components/space/StationSpace').then((module) => {
    resolve(module)
  })
}
const Icon = (resolve) => {
  import('@/components/configure/icon/Icon').then((module) => {
    resolve(module)
  })
}
const SysPic = (resolve) => {
  import('@/components/configure/SysPic').then((module) => {
    resolve(module)
  })
}
const EnergySpace = (resolve) => {
  import('@/components/space/EnergySpace').then((module) => {
    resolve(module)
  })
}
const Dict = (resolve) => {
  import('@/components/configure/Dict').then((module) => {
    resolve(module)
  })
}
const User = (resolve) => {
  import('@/components/base/User').then((module) => {
    resolve(module)
  })
}
const Menu = (resolve) => {
  import('@/components/base/Menu').then((module) => {
    resolve(module)
  })
}
const Role = (resolve) => {
  import('@/components/base/Role').then((module) => {
    resolve(module)
  })
}
export default [
  {
    path: '/system',
    component: Main,
    children: [
      {
        path: '',
        component: DeviceType
      },
      {
        path: 'iot',
        component: PlacesHolder,
        children: [
          {
            path: 'deviceType',
            component: DeviceType
          }, {
            path: 'deviceManage',
            component: DeviceManage
          }, {
            path: 'configDevice',
            component: BigDevice
          },
          {
            path: 'bingo',
            component: EnergyDataRouter
          }
        ]
      },
      {
        path: 'air',
        component: PlacesHolder,
        children: [
          {
            path: 'monitoring',
            component: RenoutsSysImg
          },
          {
            path: 'controllers',
            component: Automation
          },
          {
            path: 'charts',
            component: DataCharts
          }
        ]
      },
      {
        path: 'space',
        component: PlacesHolder,
        children: [
          {
            path: 'space',
            component: Space
          },
          {
            path: 'stationSpace',
            component: StationSpace
          }
        ]
      },
      {
        path: 'config',
        component: PlacesHolder,
        children: [
          {
            path: 'icon',
            component: Icon
          }, {
            path: 'syspic',
            component: SysPic
          }, {
            path: 'espace',
            component: EnergySpace
          },
          {
            path: 'dict',
            component: Dict
          }
        ]
      },
      {
        path: 'hr',
        component: PlacesHolder,
        children: [
          {
            path: 'user',
            component: User
          },
          {
            path: 'menu',
            component: Menu
          },
          {
            path: 'role',
            component: Role
          }
        ]
      }
    ]
  }
]
